from .handle import handle

class envDataHandle(handle):
    def __init__(self):
        super(envDataHandle, self).__init__()

    def getEnvData(self, data_device_id, target_time):
        data = {
            "dataDeviceId": data_device_id,
            "create_time": target_time  # "2020-09-20"
        }

        url = self._base_url + "get_env_data"

        return self._handle(url=url, data=data, htype="GET")

def main():
    test = envDataHandle()
    state, ret = test.getEnvData("262041615237", "2020-10-15")
    print(ret)

if __name__ == '__main__':
    main()
